<%@ page import="com.lms.mapper.BorrowRecordDAO" %>
<%@ page import="com.lms.pojo.BorrowRecord" %><%--
  Created by IntelliJ IDEA.
  User: 24534
  Date: 2023/6/7
  Time: 13:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>修改借阅记录</title>
</head>

<link rel="stylesheet" type="text/css" href="css/borrowRecordModify.css">

<body>

<%
    int id = Integer.parseInt(request.getParameter("recordID"));

    BorrowRecordDAO dao = new BorrowRecordDAO();
    BorrowRecord borrowRecord = dao.findById(id);
%>

<h2>
    <span>修</span>改<span>借阅记录</span>
</h2>

<form action="${pageContext.request.contextPath}/modifyBorrowRecord" method="post">
    <label for="recordID">Record ID:</label>
    <input type="text" name="recordID" id="recordID" readonly required value="<%=borrowRecord.getRecordID()%>"><br>
    <label for="userId">User ID:</label>
    <input type="text" name="userId" id="userId" required value="<%=borrowRecord.getUserID()%>"><br>
    <label for="bookId">Book ID:</label>
    <input type="text" name="bookId" id="bookId" required value="<%=borrowRecord.getBookID()%>"><br>
    <label for="borrowDate">借阅时间:</label>
    <input type="date" name="borrowDate" id="borrowDate" required value="<%=borrowRecord.getBorrowDate().toString()%>"><br>
    <label for="returnDate">预计归还时间:</label>
    <input type="date" name="returnDate" id="returnDate" required value="<%=borrowRecord.getReturnDate().toString()%>"><br>
    <label for="actualReturnDate">实际归还时间:</label>
    <input type="date" name="actualReturnDate" id="actualReturnDate" required value="<%=borrowRecord.getActualReturnDate()%>"><br>
    <input type="submit" value="修改">
</form>
</body>
</html>
